package pl.edu.agh.io.fx3.treecreator;

import java.io.File;
import java.io.IOException;

import pl.edu.agh.io.fx3.exceptions.FileAlreadyExistsException;
import pl.edu.agh.io.fx3.monitor.IFile;

/**
 * Interface which defines generic operations on tree hierarchy
 * 
 * @author Jaroslaw Janik
 */
public interface TreeCreator {

	/**
	 * Adds a new file to file system with absolute vfs pathname.
	 * 
	 * @param pathname A pathname from virtual file system.
	 * @return A new instance of java.io.File related to real file.
	 * @throws IOException
	 */
	File addFile(String pathname) throws IOException, FileAlreadyExistsException;
	
	/**
	 * Deletes a file which is represented by IFile abstraction.
	 * 
	 * @param file An IFile abstraction.
	 * @return True if file deleting succeed; False otherwise.
	 */
	boolean deleteFile(IFile file);
}
